﻿#region Using Directives

    using System;

    using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Common.Criteria
{
    /// <summary>
    /// Criteria class specifying the criteria allowable for a search for a Branch object
    /// </summary>
    [Serializable]
    public class BranchCriteria : CriteriaBase<BranchCriteria>
    {

        #region Constructors

        /// <summary>
        /// Default constructor for this class
        /// </summary>
        /// <param name="branchGuid">The Guid of the Branch to associate with this criteria</param>                      
        public BranchCriteria(Guid branchGuid)
        {
            BranchGUID = branchGuid;
        }

        /// <summary>
        /// Overloaded constructor for this class that accepts extra parameters 
        /// </summary>
        /// <param name="companyGuid">The Guid of the Company/Client to associate with this criteria</param>
        /// <param name="countryGuid">The Guid of the Branch to associate with this criteria</param>   
        public BranchCriteria(Guid? companyGuid, Guid? countryGuid)
        {
            CompanyGUID = companyGuid;
            CountryGUID = countryGuid;
        }

        /// <summary>
        /// Overloaded constructor for this class that accepts extra parameters 
        /// </summary>
        /// <param name="branchGuid">The Guid of the Branch to associate with this criteria</param>   
        /// <param name="userGuid">The Guid of the User to associate with this criteria</param> 
        /// <param name="companyGuid">The Guid of the Company to associate with this criteria</param>
        public BranchCriteria(Guid? branchGuid, Guid? userGuid, Guid? companyGuid)
        {
            BranchGUID = branchGuid;
            UserGUID = userGuid;
            CompanyGUID = companyGuid;
        }

        #endregion

        #region Properties

            /// <summary>
            /// This Guid is used to identify the Branch object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> BranchGUIDProperty = RegisterProperty<Guid?>(p => p.BranchGUID);
            /// <summary>
            /// This Guid is used to identify the Branch object associated with this criteria
            /// </summary>
            public Guid? BranchGUID
            {
                get { return ReadProperty(BranchGUIDProperty); }
                private set { LoadProperty(BranchGUIDProperty, value); }
            }

            /// <summary>
            /// This Guid is used to identify the User object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> UserGUIDProperty = RegisterProperty<Guid?>(p => p.UserGUID);
            /// <summary>
            /// This Guid is used to identify the User object associated with this criteria
            /// </summary>
            public Guid? UserGUID
            {
                get { return ReadProperty(UserGUIDProperty); }
                private set { LoadProperty(UserGUIDProperty, value); }
            }

            /// <summary>
            /// This Guid is used to identify the Company object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> CompanyGUIDProperty = RegisterProperty<Guid?>(p => p.CompanyGUID);
            /// <summary>
            /// This Guid is used to identify the Company object associated with this criteria
            /// </summary>
            public Guid? CompanyGUID
            {
                get { return ReadProperty(CompanyGUIDProperty); }
                private set { LoadProperty(CompanyGUIDProperty, value); }
            }

            /// <summary>
            /// This Guid is used to identify the Company object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> CountryGUIDProperty = RegisterProperty<Guid?>(p => p.CountryGUID);
            /// <summary>
            /// This Guid is used to identify the Company object associated with this criteria
            /// </summary>
            public Guid? CountryGUID
            {
                get { return ReadProperty(CountryGUIDProperty); }
                private set { LoadProperty(CountryGUIDProperty, value); }
            }

        #endregion

    }
}
